using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace Legend.Threading
{
    /// <summary>
    /// Represents a class that raises an event at a specific interval.
    /// </summary>
    public interface ITimer
        : IDisposable
    {
        /// <summary>
        /// Occurs a given interval.
        /// </summary>
        event EventHandler Elapsed;

        /// <summary>
        /// Starts raising the Elapsed-event.
        /// </summary>
        void Start();

        /// <summary>
        /// Stop raising the Elapsed-event.
        /// </summary>
        void Stop();
    }
}
